﻿using DevTeam;
using System;
using System.Data;

namespace ConfExpert.Forms.Rapor
{
    public partial class xrYikamaKartelasi : DevReport
    {

        DataSet ds { get; set; }
        public xrYikamaKartelasi()
        {
            InitializeComponent();
        }

         public xrYikamaKartelasi(string idx, string SpName = "GetYikamaKartelasiBySipId")
            : this()
        {
            ds = ExecuteDataSet(SpName, idx,Session.CurrentUser.UserId);

            BindDstoReport();
        }

        void BindDstoReport()
        {            
            this.DataSource = ds;
            this.DataMember = "Table1";

            DataRow drHeader = ds.Tables["Table"].Rows[0];

            tcTarih.Text = DateTime.Now.ToString();
            tcPlanlamaTem.Text = drHeader["Name"].ToString();
            tcDosyaNo.Text = drHeader["DosyaNo"].ToString();
            tcYikamaRecete.Text = drHeader["Yikama"].ToString();

            pbPicture.DataBindings.Add("Image", null, "Table1.PhotoMikro");
            tcScan.Controls.Add(pbPicture);
            tcProductId.DataBindings.Add("Text", null, "Table1.Name");
            tcMusteriArtikeli.DataBindings.Add("Text", null, "Table1.Artikel");
            tcRenk.DataBindings.Add("Text",null,"Table1.Renk");
          
            
        }

    }
}
